package com.tudouji.project.pay.service;

import com.tudouji.framework.web.domain.AjaxResult;
import com.tudouji.project.pay.domain.Payinfo;

import java.math.BigDecimal;
import java.util.List;

/**
 * 支付Service接口
 *
 * @author tudouji
 * @date 2021-04-06
 */
public interface IPayinfoService
{
    /**
     * 查询支付
     *
     * @param guid 支付ID
     * @return 支付
     */
    public Payinfo selectPayinfoById(String guid);
    public Payinfo selectPayinfoDetailById(Long id);
    public Payinfo selectPayinfoByAutoId(Long id);

    /**
     * 查询支付列表
     *
     * @param payinfo 支付
     * @return 支付集合
     */
    public List<Payinfo> selectPayinfoList(Payinfo payinfo);
    public List<Payinfo> selectPayinfoListOld(Payinfo payinfo);
    public List<Payinfo> selectPayinfoListFo(Payinfo payinfo);
    public List<Payinfo> selectPayinfoListFl(Payinfo payinfo);

    /**
     * 新增支付
     *
     * @param payinfo 支付
     * @return 结果
     */
    public int insertPayinfo(Payinfo payinfo);

    /**
     * 修改支付
     *
     * @param payinfo 支付
     * @return 结果
     */
    public int updatePayinfo(Payinfo payinfo);

    /**
     * 批量删除支付
     *
     * @param guids 需要删除的支付ID
     * @return 结果
     */
    public int deletePayinfoByIds(String[] guids);

    /**
     * 删除支付信息
     *
     * @param guid 支付ID
     * @return 结果
     */
    public int deletePayinfoById(String guid);

    List<Payinfo> listWx(Payinfo payinfo, String status, String functionType);

    AjaxResult save(Payinfo payinfo, String fileIds, Long taskid, String opinion);

    AjaxResult approval(Long id, Long taskid, String opinion, String fileIds);

    AjaxResult refuse(Long id, String fileIds, String opinion, Long taskid, Long refuseNodeid, Long backUserid);

    AjaxResult del(Long id);

    AjaxResult finance(Long id, Long taskid, String opinion, String fileIds, Integer invoiceOn);

    AjaxResult pay(Long id, Long taskid, String opinion, String fileIds, BigDecimal applyAmount, Integer continuepayFlag);

    AjaxResult finalPay(Long id, Long taskid, String opinion, String fileIds, BigDecimal applyAmount);

    AjaxResult getUnPayFreightorder();

    AjaxResult statisticsOrderByPlan(Long orgId, Long supplierId, String keywords);
    AjaxResult getUnPayFreightorders(Long orgId, Long supplierId);
    AjaxResult getUnPayPurchasebills(Long orgId, Long supplierId);
    AjaxResult getUnPayPurchasebillGroup(Long orgId, Long supplierId, String keywords);

}
